import _00SetFunc as ss
import __00SetRelation as sr

#验证关系运算性质
Xm,Ym,n1,n2=20,15,15,10
X=set(range(Xm))
Y=set(range(Ym))
XY=set(ss.Cartesianproduct(X,Y))
R=sr.createrelation(X,Y,n1)
S=sr.createrelation(X,Y,n2)
RS=set(R)|set(S)
E1=(set(R)<=set(XY))
E2=(set(S)<=set(XY))
E3=(set(RS)<=set(XY))
tv=(not(E1&E2))|E3 
print("R,S",R,S)
print("tv",tv)